package com.niit.beans;

import org.springframework.stereotype.Component;

@Component
public class User2 {
    private Dept dept;

    public User2(Dept dept) {
        this.dept = dept;
    }

    public void  teamwork(){
        // 为什么要注入dept的缘由
        dept.teambuilding();
    }
}